/* 
 * File:   Stack.h
 * Author: Thomas Trojer
 *
 * Created on 08. Oktober 2010, 00:31
 */

#ifndef STACK_H
#define	STACK_H

#include <cstdlib>
#include <cstring>

template <class Val> class Stack {
public:
    Stack();
    Stack(const Stack& orig);
    virtual ~Stack();

    const Val* const getArray() const;

    Val operator [] (int i) const;

    int size() const;
    int push(const Val &item);
    Val* pop();

    void reset();
private:
    Val* array;

    int asize;
    int memsize;

};

#include "../src/Stack.cpp.inl"

typedef Stack<bool> BooleanStack;
typedef Stack<char*> CharsStack;
typedef Stack<float> FloatStack;

#endif	/* STACK_H */
